
<div class="kpr-boxlet-grp">
  <div class="kbg-title">Buckets Management</div>
</div>

<div class="kpr-boxlet">

{{if .list}}
<table class="table table-hover">
  <thead>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Data Keys</th>
      <th>Size</th>
      <th>Created</th>
      <th>Access Keys</th>
      <th></th>
    </tr>
  </thead>
  <tbody class="kpr_font_fixspace">
    {{range .list}}
    <tr>
      <td>{{.name}}</td>
      <td>{{.desc}}</td>
      <th>{{.stateDataKeys}}</td>
      <td>{{.stateDataSizeDisplay}}</td>
      <td>{{date .created}}</td>
      <th>
        <a href="#{{.name}}" class="dqot6kn2 btn btn-default btn-xs" style="width:60px">{{.accessKeys}} &rarr;</a>
      </td>
      <td align="right">
        <a class="hjg0m3 btn btn-default btn-xs" href="#{{.name}}">Setting</a>
      </td>
    </tr>
    {{end}}
  </tbody>
</table>


{{else}}
<div class="alert alert-info" style="margin:20px 0;">Data not found</div>
{{end}}

<div>
<button type="button" 
  class="btn btn-primary btn-sm" 
  onclick="keeperComLoader('bucket/set')">
  New Bucket
</button>
</div>

</div>


<script type="text/javascript">

$(".hjg0m3").click(function() {
    var name = $(this).attr("href").substr(1);
    keeperComLoader("bucket/set?name="+ name);
});

$(".dqot6kn2").click(function() {
    var name = $(this).attr("href").substr(1);
    _kpr_nav_go("bucket/access-keys", "name="+ name);
});

</script>
